<template>
  <div>

    <exam-list @monitorRoll="monitorRoll" @onHandelControl="onHandelControl" v-if="isShow === 'examList' "/>

    <video-monitor :dataObj="dataObj" @back="back" v-if="isShow === 'videoMonitor' "/>


  </div>
</template>

<script>
import examList from './examList';
import videoMonitor from './videoMonitor';

let _this = null;
export default {
  components: {examList, videoMonitor},
  data() {
    return {
      dataObj: {},
      isShow: 'examList'
    }
  },
  methods: {

    monitorRoll: function (data) {
      this.$emit('monitorRoll', data);
    },
    onHandelControl: function (id) {
      this.dataObj.id = id;
      this.isShow = 'videoMonitor'
    },

    back: function () {
      this.isShow = 'examList'
    }
  },
  created() {
    _this = this;
  }
}
</script>

<style scoped>

</style>
